package com.taiji.redispractise.controller;

import com.taiji.redispractise.domain.S1Teacher;
import com.taiji.redispractise.service.MybatisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/mybatis")
public class MybatisTest {

    @Autowired
    MybatisService mybatisService;

    @GetMapping("/teacher")
    public List<S1Teacher> getTeacherAll() {
        return mybatisService.getTeacherAll();
    }
    @GetMapping("/teacherList")
    public List<S1Teacher> getTeacherAllList() {
        return mybatisService.getTeacherAllList();
    }
    @GetMapping("/teacherHash")
    public List<S1Teacher> getTeacherAllHash() {
        return mybatisService.getTeacherAllHash();
    }
}
